package com.geotmt.billingcenter.modules.rabbit;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Description 类描述
 * @Author      yanghanwei
 * @Mail        yanghanwei@geotmt.com
 * @Date        2019/4/2 15:52
 * @Version     v1
 **/
@Component
public class RabbitListen {

    /**
     * 监听器监听指定的Queue
     */
    @RabbitListener(queues="topic.message")
    public void process1(String str) {
        System.out.println("message:"+str);
    }

    /**
     * 监听器监听指定的Queue
     * @param str
     */
    @RabbitListener(queues="topic.messages")
    public void process2(String str) {
        System.out.println("messages:"+str);
    }
}
